package com.wutong.eams.other;

import lombok.Data;

import java.util.List;

@Data
public class Page<E> {
    private int pageNum;
    private int pageSize;
    private int totalCount;
    private int totalPage;
    private List<E> result;

    public Page(int pageNum, int pageSize, int totalCount, List<E> result) {
        this.pageNum = pageNum;
        this.pageSize = pageSize;
        this.totalCount = totalCount;
        this.totalPage = (int) Math.ceil((double) totalCount / pageSize);
        this.result = result;
    }
}
